
cmake_minimum_required(VERSION 3.4.1)
add_library( # Sets the name of the library.
            dxtx
            SHARED
            src/main/jni/bs.cpp
            src/main/jni/CvxText.cpp
            )

set(OpenCV_DIR C:/Users/user/Downloads/opencv-3.4.2-android-sdk/OpenCV-android-sdk/sdk/native/jni)
find_package(OpenCV REQUIRED)
target_include_directories(
                            dxtx
                            PRIVATE
                            C:/Users/user/Downloads/opencv-3.4.2-android-sdk/OpenCV-android-sdk/sdk/native/jni/include
                            src/main/jni/include
                            )
add_library(freetype STATIC IMPORTED)
set_target_properties(freetype  PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/obj/local/${ANDROID_ABI}/libft2.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
find_library(
              Log-lib
              Log )
target_link_libraries(
                        dxtx
                        freetype
                       ${OpenCV_LIBS}
                       ${Log-lib} )
